{% load staticfiles %}
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<link rel="stylesheet" type="text/css" href="{% static 'css/bootstrap.min.css' %}">
<link rel="stylesheet" type="text/css" href="{% static 'css/font-awesome.min.css' %}">
<link rel="stylesheet" type="text/css" href="{% static 'css/style-admin-check.css' %}">
<link rel="stylesheet" type="text/css" href="{% static 'css/unit.css' %}">
<script type="text/javascript" src="{% static 'js/unit.js' %}">
</script>

<title>企业考勤管理系统-个人账户</title>
</head>
<body onload="startTime()">
    <div class="head">
    	<h2>企业管理系统</h2>
    	<div class="head-right">
    		<span class="head-help"><a href="#">帮助</a></span>
    		<div id="head-time"></div>
    	</div>
    </div>
    <div id="navigation">
    	<nav role="navigation">
		  <ul>
              <a href="/staff/main/"><li>首页</li></a>
        <a href="/staff/personal_main/"><li>个人信息</li></a>
        <a href="/staff/personal_check/"><li class="li-active">考勤记录</li></a>
        <a href="/staff/personal_voc/"><li>请假管理</li></a>

      </ul>
		</nav>
    </div>
    <div class="left-list">
    	<a href="/staff/personal_check/"><div class="ll-active">签到</div></a>
      <a href="/staff/pc-servey"><div class="left-child">概况记录</div></a>
      <a href="/staff/pc-sign"><div class="left-child">签到查询</div></a>
    </div>
    <div class="right">
      <span class="title-bar">考勤记录<i class="fa fa-angle-right" style="letter-spacing:2px;"></i>签到</span>
      <div class="both"></div>
      <div class="order">
        <span class="title-bar">班次信息</span><br/>
        <div class="order-detail">
          <div style="margin:12px 0 12px 40px;">班次<span style="float:right;margin-right:45px;">早班</span></div>
          <div style="margin:12px 0 12px 40px;">时间<span style="float:right;margin-right:45px;">8:00-11:00</span></div>
          <div style="margin:12px 0 12px 40px;">签到时间<span style="float:right;margin-right:45px;">8:00-8:30</span></div>
          <div style="margin:12px 0 12px 40px;">签退时间<span style="float:right;margin-right:45px;">11:00-11:30</span></div>
        </div>
      </div>
      <div class="Calendar">
        <div id="idCalendarPre">&lt;&lt;</div>
        <div id="idCalendarNext">&gt;&gt;</div>
        <span id="idCalendarYear">2008</span>年 <span id="idCalendarMonth">8</span>月
        <table cellspacing="0">
          <thead>
            <tr>
              <td>日</td>
              <td>一</td>
              <td>二</td>
              <td>三</td>
              <td>四</td>
              <td>五</td>
              <td>六</td>
            </tr>
          </thead>
          <tbody id="idCalendar">
          </tbody>
        </table>
      </div>
      <script language="JavaScript">

var cale = new Calendar("idCalendar", {
    SelectDay: new Date().setDate(10),
    onSelectDay: function(o){ o.className = "onSelect"; },
    onToday: function(o){ o.className = "onToday"; },
    onFinish: function(){
        $("idCalendarYear").innerHTML = this.Year; $("idCalendarMonth").innerHTML = this.Month;
        var flag = [10,15,20];
        for(var i = 0, len = flag.length; i < len; i++){
            this.Days[flag[i]].innerHTML = "<a href='javascript:void(0);' onclick=\"alert('日期是:"+this.Year+"/"+this.Month+"/"+flag[i]+"');return false;\">" + flag[i] + "</a>";
        }
    }
});

$("idCalendarPre").onclick = function(){ cale.PreMonth(); }
$("idCalendarNext").onclick = function(){ cale.NextMonth(); }

</SCRIPT>
        <div class="clear"></div>
      <hr/>
      <form action="/staff/signintime/" method="post">
      {% csrf_token %}
      <div class="sign">
        实际签到时间：<span class="sign-time">{% if request.session.signintime %}
                                {{ request.session.signintime }}
                          {% else %}
                                {{ '未签到' }}
                          {% endif %}
                    </span>
{#        <button class="btn btn-default"><a href="/chenk/signintime">签到</a></button>#}
        <input type="submit" class="btn btn-default" value="签到">
      </div>
      </form>
      <form action="/staff/signouttime/" method="post">
      {% csrf_token %}
      <div class="sign">
        实际签退时间：<span class="sign-time">
                          {% if request.session.signouttime %}
                                {{ request.session.signouttime }}
                          {% else %}
                                {{ '未签到' }}
                          {% endif %}
                     </span>
        <input type="submit" class="btn btn-default" value="签到">
      </div>
      </form>
{#      <div class="sign">#}
{#        实际签到时间：<span class="sign-time">15:23</span>#}
{#        <button class="btn btn-default">签到</button><button class="btn btn-default">补签</button>#}
{#      </div>#}
    </div>
</body>